package com.itheima.homework.排序查找算法;

import java.util.Arrays;

public class Demo3 {
    public static void main(String[] args) {
        int[] arr = {431,54,25,25,26,45,2,4,65,3,64,6,46,7,54};
        int temp=arr[0];
        for (int i = 0; i < arr.length; i++) {
            for (int j = 0; j <arr.length-1-i; j++) {
                if(arr[j]>arr[j+1]){
                    temp=arr[j];
                    arr[j]=arr[j+1];
                    arr[j+1]=temp;
                }
            }
        }
        int i = Arrays.binarySearch(arr, 200);
        if(i<0){
            System.out.println("不存在");
        }
    }
}
